﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DDD;

namespace UnitTest {
    [TestClass]
    public class TestImage2D_New {


        #region Test(R)
        /// <summary>
        /// コンストラクターのテスト(R)
        /// </summary>
        [TestMethod]
        public void Test_New_R () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R8, width, height);

            Assert.AreEqual (PixelFormat.R8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R8)
        /// </summary>
        [TestMethod]
        public void Test_New_R8 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R8, width, height);

            Assert.AreEqual (PixelFormat.R8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R8i)
        /// </summary>
        [TestMethod]
        public void Test_New_R8i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<sbyte> (PixelFormat.R8i, width, height);

            Assert.AreEqual (PixelFormat.R8i, img.PixelFormat);
            Assert.AreEqual (PixelType.SByte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R8ui)
        /// </summary>
        [TestMethod]
        public void Test_New_R8ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<byte> (PixelFormat.R8ui, width, height);

            Assert.AreEqual (PixelFormat.R8ui, img.PixelFormat);
            Assert.AreEqual (PixelType.Byte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R16)
        /// </summary>
        [TestMethod]
        public void Test_New_R16 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R16, width, height);

            Assert.AreEqual (PixelFormat.R16, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R16f)
        /// </summary>
        [TestMethod]
        public void Test_New_R16f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R16f, width, height);

            Assert.AreEqual (PixelFormat.R16f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R16i)
        /// </summary>
        [TestMethod]
        public void Test_New_R16i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<short> (PixelFormat.R16i, width, height);

            Assert.AreEqual (PixelFormat.R16i, img.PixelFormat);
            Assert.AreEqual (PixelType.Short, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R16ui)
        /// </summary>
        [TestMethod]
        public void Test_New_R16ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<ushort> (PixelFormat.R16ui, width, height);

            Assert.AreEqual (PixelFormat.R16ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UShort, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R32f)
        /// </summary>
        [TestMethod]
        public void Test_New_R32f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R32f, width, height);

            Assert.AreEqual (PixelFormat.R32f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R32i)
        /// </summary>
        [TestMethod]
        public void Test_New_R32i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<int> (PixelFormat.R32i, width, height);

            Assert.AreEqual (PixelFormat.R32i, img.PixelFormat);
            Assert.AreEqual (PixelType.Int, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R32ui)
        /// </summary>
        [TestMethod]
        public void Test_New_R32ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<uint> (PixelFormat.R32ui, width, height);

            Assert.AreEqual (PixelFormat.R32ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UInt, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }
         #endregion

        #region Test(RG)

        /// <summary>
        /// コンストラクターのテスト(RG8)
        /// </summary>
        [TestMethod]
        public void Test_New_RG8 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RG8, width, height);

            Assert.AreEqual (PixelFormat.RG8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG8i)
        /// </summary>
        [TestMethod]
        public void Test_New_RG8i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<sbyte> (PixelFormat.RG8i, width, height);

            Assert.AreEqual (PixelFormat.RG8i, img.PixelFormat);
            Assert.AreEqual (PixelType.SByte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG8ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RG8ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<byte> (PixelFormat.RG8ui, width, height);

            Assert.AreEqual (PixelFormat.RG8ui, img.PixelFormat);
            Assert.AreEqual (PixelType.Byte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG16)
        /// </summary>
        [TestMethod]
        public void Test_New_RG16 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RG16, width, height);

            Assert.AreEqual (PixelFormat.RG16, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG16f)
        /// </summary>
        [TestMethod]
        public void Test_New_RG16f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RG16f, width, height);

            Assert.AreEqual (PixelFormat.RG16f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG16i)
        /// </summary>
        [TestMethod]
        public void Test_New_RG16i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<short> (PixelFormat.RG16i, width, height);

            Assert.AreEqual (PixelFormat.RG16i, img.PixelFormat);
            Assert.AreEqual (PixelType.Short, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG16ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RG16ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<ushort> (PixelFormat.RG16ui, width, height);

            Assert.AreEqual (PixelFormat.RG16ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UShort, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG32f)
        /// </summary>
        [TestMethod]
        public void Test_New_RG32f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RG32f, width, height);

            Assert.AreEqual (PixelFormat.RG32f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG32i)
        /// </summary>
        [TestMethod]
        public void Test_New_RG32i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<int> (PixelFormat.RG32i, width, height);

            Assert.AreEqual (PixelFormat.RG32i, img.PixelFormat);
            Assert.AreEqual (PixelType.Int, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RG32ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RG32ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<uint> (PixelFormat.RG32ui, width, height);

            Assert.AreEqual (PixelFormat.RG32ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UInt, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (2, img.Cpp);
        }
        #endregion


        #region Test(RGB)
   

        /// <summary>
        /// コンストラクターのテスト(RGB8)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB8 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB8, width, height);

            Assert.AreEqual (PixelFormat.RGB8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB8i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB8i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<sbyte> (PixelFormat.RGB8i, width, height);

            Assert.AreEqual (PixelFormat.RGB8i, img.PixelFormat);
            Assert.AreEqual (PixelType.SByte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB8ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB8ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<byte> (PixelFormat.RGB8ui, width, height);

            Assert.AreEqual (PixelFormat.RGB8ui, img.PixelFormat);
            Assert.AreEqual (PixelType.Byte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB16)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB16 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB16, width, height);

            Assert.AreEqual (PixelFormat.RGB16, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB16f)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB16f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB16f, width, height);

            Assert.AreEqual (PixelFormat.RGB16f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB16i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB16i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<short> (PixelFormat.RGB16i, width, height);

            Assert.AreEqual (PixelFormat.RGB16i, img.PixelFormat);
            Assert.AreEqual (PixelType.Short, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB16ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB16ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<ushort> (PixelFormat.RGB16ui, width, height);

            Assert.AreEqual (PixelFormat.RGB16ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UShort, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB32f)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB32f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB32f, width, height);

            Assert.AreEqual (PixelFormat.RGB32f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB32i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB32i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<int> (PixelFormat.RGB32i, width, height);

            Assert.AreEqual (PixelFormat.RGB32i, img.PixelFormat);
            Assert.AreEqual (PixelType.Int, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB32ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB32ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<uint> (PixelFormat.RGB32ui, width, height);

            Assert.AreEqual (PixelFormat.RGB32ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UInt, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }
        #endregion


        #region Test(RGBA)
        /// <summary>
        /// コンストラクターのテスト(RGBA)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGBA8, width, height);

            Assert.AreEqual (PixelFormat.RGBA8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA8)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA8 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGBA8, width, height);

            Assert.AreEqual (PixelFormat.RGBA8, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA8i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA8i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<sbyte> (PixelFormat.RGBA8i, width, height);

            Assert.AreEqual (PixelFormat.RGBA8i, img.PixelFormat);
            Assert.AreEqual (PixelType.SByte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA8ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA8ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<byte> (PixelFormat.RGBA8ui, width, height);

            Assert.AreEqual (PixelFormat.RGBA8ui, img.PixelFormat);
            Assert.AreEqual (PixelType.Byte, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA16)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA16 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGBA16, width, height);

            Assert.AreEqual (PixelFormat.RGBA16, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA16f)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA16f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGBA16f, width, height);

            Assert.AreEqual (PixelFormat.RGBA16f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA16i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA16i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<short> (PixelFormat.RGBA16i, width, height);

            Assert.AreEqual (PixelFormat.RGBA16i, img.PixelFormat);
            Assert.AreEqual (PixelType.Short, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA16ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA16ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<ushort> (PixelFormat.RGBA16ui, width, height);

            Assert.AreEqual (PixelFormat.RGBA16ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UShort, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA32f)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA32f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGBA32f, width, height);

            Assert.AreEqual (PixelFormat.RGBA32f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA32i)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA32i () {
            var width = 320;
            var height = 320;
            var img = new Image2D<int> (PixelFormat.RGBA32i, width, height);

            Assert.AreEqual (PixelFormat.RGBA32i, img.PixelFormat);
            Assert.AreEqual (PixelType.Int, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGBA32ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA32ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<uint> (PixelFormat.RGBA32ui, width, height);

            Assert.AreEqual (PixelFormat.RGBA32ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UInt, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }
        #endregion

        #region Test(Complex)

        /// <summary>
        /// コンストラクターのテスト(RGB9E5)
        /// </summary>
        [TestMethod]
        public void Test_New_RGBA9E5 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB9e5, width, height);

            Assert.AreEqual (PixelFormat.RGB9e5, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(R11G11B10f)
        /// </summary>
        [TestMethod]
        public void Test_New_R11G11B10f () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.R11G11B10f, width, height);

            Assert.AreEqual (PixelFormat.R11G11B10f, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (3, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB10A2)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB10A2 () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.RGB10A2, width, height);

            Assert.AreEqual (PixelFormat.RGB10A2, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        /// <summary>
        /// コンストラクターのテスト(RGB10A2ui)
        /// </summary>
        [TestMethod]
        public void Test_New_RGB10A2ui () {
            var width = 320;
            var height = 320;
            var img = new Image2D<ushort> (PixelFormat.RGB10A2ui, width, height);

            Assert.AreEqual (PixelFormat.RGB10A2ui, img.PixelFormat);
            Assert.AreEqual (PixelType.UShort, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (4, img.Cpp);
        }

        #endregion

        #region Test(Depth)
        /// <summary>
        /// コンストラクターのテスト(Depth)
        /// </summary>
        [TestMethod]
        public void Test_New_Depth () {
            var width = 320;
            var height = 320;
            var img = new Image2D<float> (PixelFormat.Depth, width, height);

            Assert.AreEqual (PixelFormat.Depth, img.PixelFormat);
            Assert.AreEqual (PixelType.Float, img.PixelType);
            Assert.AreEqual (width, img.Width);
            Assert.AreEqual (height, img.Height);
            Assert.AreEqual (1, img.Cpp);
        }
        #endregion
    }
}
